# blib/plugs/test.py
#
#

""" test plugin. """

## blib imports

from blib import cmnds, Event

## test commands

def test(event): event.reply("yooo %s !!" % event.nick)

cmnds.register("test", test)

## test_json command

def test_json(event): event.reply(event.make_json(indent=True))

cmnds.register("test_json", test_json)

##  test_load command

def test_load(event):
     e = Event()
     e.txt= "this is a test and nothing more than a test..."
     e.save()
     e.load()
     event.reply(e.make_json())
     event.display(e)

cmnds.register("test_load", test_load)

## test_unicode command

def test_unicode(event):
    """ no arguments - send unicode test down the output paths. """
    event.reply("Đíť ìš éèñ ëņċøďıńğŧęŝţ· .. にほんごがはなせません .. ₀0⁰₁1¹₂2²₃3³₄4⁴₅5⁵₆6⁶₇7⁷₈8⁸₉9⁹ .. ▁▂▃▄▅▆▇▉▇▆▅▄▃▂▁ .. .. uǝʌoqǝʇsɹǝpuo pɐdı ǝɾ ʇpnoɥ ǝɾ - <AcidNerd> because of é or è")

cmnds.register("test_unicode", test_unicode)

def test_dump(event): event.reply(event.typed)

cmnds.register("test_dump", test_dump)
